<!DOCTYPE html>
<html lang="en">







<head>
 <script>(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/0eeeae6f.js","daovoice")
 daovoice('init', {
  app_id: "246e9537"
});
daovoice('update');
 </script>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/apple-touch-icon.png">
  <link rel="icon" type="image/png" href="/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="description" content="">

  <meta name="author" content="xixilili">
  <meta name="keywords" content="">
  
  <title>USTC机试_12 ~ xixilili.blog</title>
  <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/5.10.2/css/all.min.css"  >
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css"  >
<link rel="stylesheet" href="https://cdn.staticfile.org/mdbootstrap/4.8.9/css/mdb.min.css"  >
<link rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/3.0.1/github-markdown.min.css"  >

<link rel="stylesheet" href="//at.alicdn.com/t/font_1067060_qzomjdt8bmp.css">



  <link rel="stylesheet" href="/lib/prettify/tomorrow-night.min.css"  >

<link rel="stylesheet" href="/css/main.css"  >


  <link rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css"  >


<meta name="generator" content="Hexo 4.2.0"></head>



<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>xixilili.blog</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
          <li class="nav-item">
            <a class="nav-link" href="/">Home</a>
          </li>
        
          
          
          
          
          <li class="nav-item">
            <a class="nav-link" href="/archives/">Archives</a>
          </li>
        
          
          
          
          
          <li class="nav-item">
            <a class="nav-link" href="/categories/">Categories</a>
          </li>
        
          
          
          
          
          <li class="nav-item">
            <a class="nav-link" href="/tags/">Tags</a>
          </li>
        
          
          
          
          
          <li class="nav-item">
            <a class="nav-link" href="/about/">About</a>
          </li>
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="view intro-2" id="background"
         style="background: url('https://capsule-1254369940.cos.ap-chengdu.myqcloud.com/xilixiliBg.jpg')no-repeat center center;
           background-size: cover;
           background-attachment: fixed;">
      <div class="full-bg-img">
        <div class="mask rgba-black-light flex-center">
          <div class="container text-center white-text fadeInUp">
            <span class="h2" id="subtitle">
              
            </span>

            
              <br>
              
                <p class="mt-3">
                  <i class="fas fa-calendar-alt" aria-hidden="true"></i>&nbsp;
                  Thursday, February 27th 2020, 9:36 am
                </p>
              

              <p>
                
                  
                  &nbsp;<i class="far fa-chart-bar"></i>
                  <span class="post-count">
                    1.7k 字
                  </span>&nbsp;
                

                
                  
                  &nbsp;<i class="far fa-clock"></i>
                  <span class="post-count">
                      9 分钟
                  </span>&nbsp;
                

                
                  <!-- 不蒜子统计文章PV -->
                  
                  &nbsp;<i class="far fa-eye" aria-hidden="true"></i>&nbsp;
                  <span id="busuanzi_container_page_pv">
                    <span id="busuanzi_value_page_pv"></span> 次
                  </span>&nbsp;
                
              </p>
            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      




<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="py-5 z-depth-3" id="board">
        <div class="post-content mx-auto" id="post">
          <div class="markdown-body">
            <p>1.字符串处理：从   string.in文件里读入两个字符串，字符串除了数字还可能包括    ‘—‘、’E’、’e’、’．’，相加之后输出到文件 string.out中，如果是浮点型，要求用科学计数法表示（最多包含 10个有效数字）。</p>
<pre><code class="c">#include&lt;iostream&gt;
#include&lt;string&gt;
#include&lt;cstdio&gt;
#include&lt;fstream&gt;
#include&lt;cstdlib&gt;
#include&lt;math.h&gt;
using namespace std;

int main(){
    ifstream infile(&quot;in.txt&quot;);
    string s1,s2;
    double x,y;
    getline(infile,s1);
    getline(infile,s2);
    if(s1.find(&#39;e&#39;)!=string::npos||s1.find(&#39;E&#39;)!=string::npos){
        if(s1.find(&#39;e&#39;)!=string::npos){
            int pos=s1.find(&#39;e&#39;);
            double a=atof((char*)s1.substr(0,pos).data());//底数
            double b=atof((char*)s1.substr(pos+1).data());//次数
            x=a*pow(10,b);
        }
        else{
            int pos=s1.find(&#39;E&#39;);
            double a=atof((char*)s1.substr(0,pos).data());//底数
            double b=atof((char*)s1.substr(pos+1).data());//次数
            x=a*pow(10,b);
        }
    }
    else{
        x=atof((char*)s1.data());
    }
    if(s2.find(&#39;e&#39;)!=string::npos||s2.find(&#39;E&#39;)!=string::npos){
        if(s2.find(&#39;e&#39;)!=string::npos){
            int pos=s2.find(&#39;e&#39;);
            double a=atof((char*)s2.substr(0,pos).data());//底数
            double b=atof((char*)s2.substr(pos+1).data());//次数
            y=a*pow(10,b);
        }
        else{
            int pos=s2.find(&#39;e&#39;);
            double a=atof((char*)s2.substr(0,pos).data());//底数
            double b=atof((char*)s2.substr(pos+1).data());//次数
            y=a*pow(10,b);
        }
    }
    else{
        y=atol((char*)s2.data());
    }
    printf(&quot;%e&quot;,x+y);

    infile.close();
}
</code></pre>
<p>2.最大公约数：从    number.in文件中读入   n个数，求出这   n个数的最小值、最大值以及它们两的最大公约数，输出到文件 number.out中。number.in中第一行为     n，接下来为  n个大于零的整数。</p>
<pre><code class="c">#include&lt;iostream&gt;
#include&lt;algorithm&gt;
#include&lt;fstream&gt;
#include&lt;cstdlib&gt;
#include &lt;sstream&gt;
using namespace std;

const int MAXN=100;
int a[MAXN];
//若是最小公倍数则是两数乘积除以它们的最大公约数
int gcd(int a,int b){//
    if(b==0) return a;
    else return gcd(b,a%b);
}



int main(){
    ifstream infile(&quot;in.txt&quot;);
    string s;
    getline(infile,s);
    int n=atoi((char*)s.data());
    getline(infile,s);
    stringstream stringin(s);//实现按空格读取,需要导入sstream文件
    int i=0;
    while(stringin&gt;&gt;a[i]){
        i++;
    }
    sort(a,a+n);
    int Min=a[0],Max=a[n-1];
    cout&lt;&lt;Min&lt;&lt;&quot; &quot;&lt;&lt;Max&lt;&lt;&quot; &quot;&lt;&lt;gcd(Min,Max);
}
</code></pre>
<p>3.任务调度：从   task.in文件中读入任务调度序列，输出    n个任务适合的一种调度方式到 task.out中。每行第一个表示前序任务，括号中的任务为若干个后序任务，表示只有在前序任务完成的情况下，后序任务才能开始。若后序为 NULL则表示无后继任务。</p>
<pre><code class="c">#include&lt;iostream&gt;
#include&lt;fstream&gt;
#include&lt;vector&gt;
#include&lt;queue&gt;
#include&lt;string&gt;
#include&lt;cstdlib&gt;
#include&lt;cstring&gt;
using namespace std;

const int MAXN=500;
vector&lt;int&gt; graph[MAXN];
int indegree[MAXN];

vector&lt;int&gt; TopologicalSort(int n){
    vector&lt;int&gt; topology;
    priority_queue&lt;int,vector&lt;int&gt;,greater&lt;int&gt; &gt; q;//逆向优先队列，为了实现拓扑序列不唯一时编号小的在前面
    for(int i=0;i&lt;n;i++){
        if(indegree[i]==0) q.push(i);
    }
    while(!q.empty()){
        int T=q.top();
        topology.push_back(T);
        q.pop();
        for(int i=0;i&lt;graph[T].size();i++){
            int v=graph[T][i];
            indegree[v]--;
            if(indegree[v]==0) q.push(v);
        }

    }
    return topology;
}

int main(){
    ifstream infile(&quot;in.txt&quot;);
    string s;
    memset(indegree,0,sizeof(indegree));
    int Count=0;
    while(getline(infile,s)){
        Count++;
        int pos=s.find(&quot;Task&quot;);
        int T=atoi((char*)s.substr(pos+4,1).data());
        s=s.substr(pos+5);
        while(s.find(&quot;Task&quot;)!=string::npos){
            int pos1=s.find(&quot;Task&quot;);
            int p=atoi((char*)s.substr(pos1+4,1).data());
            indegree[p]++;
            graph[T].push_back(p);
            s=s.substr(pos1+5);
        }
    }
    vector&lt;int&gt; v=TopologicalSort(Count);
    for(int i=0;i&lt;v.size();i++){
        cout&lt;&lt;&quot;Task&quot;&lt;&lt;v[i]&lt;&lt;&quot; &quot;;
    }
}
</code></pre>
<p>4.火车票订购：火车经过   X站，火车最大载客人数为   m，有 n个订票请求，请求订购从 a站到  b站的  k张票，若能满足订购要求则输出   1，否则输出 0。数据从 ticket.in中输入，第一行有四个数，分别为 n，m。接下来有  n行，每行三个数分别为   a，b，k。结果输出到文件 ticket.out中</p>
<pre><code class="c">#include&lt;iostream&gt;
#include&lt;fstream&gt;
#include&lt;sstream&gt;
using namespace std;

const int MAXN=100;
int station[MAXN];
int n,m;
int result[MAXN];
bool jugde(int a,int b,int k){
    bool flag=true;
    for(int i=a;i&lt;=b;i++){
        if(station[i]+k&gt;m){
            flag=false;
            break;
        }
    }
    return flag;
}

int main(){
    string s;
    ifstream infile(&quot;in.txt&quot;);
    getline(infile,s);
    stringstream stringin(s);
    stringin&gt;&gt;n; stringin&gt;&gt;m;
    int j=0;
    for(int i=0;i&lt;n;i++){
        int a,b,k;
        getline(infile,s);
        stringstream stringin1(s);
        stringin1&gt;&gt;a; stringin1&gt;&gt;b; stringin1&gt;&gt;k;
        if(jugde(a,b,k)){
            for(int i=a;i&lt;=b;i++){
                station[i]+=k;
            }
            result[j++]=1;
        }
        else{
            result[j++]=0;
        }
    }
    infile.close();
    ofstream outfile(&quot;out.txt&quot;);
    for(int i=0;i&lt;n;i++){
        outfile&lt;&lt;result[i]&lt;&lt;endl;
    }
    outfile.close();
}
</code></pre>
<p>5.最短路径：有   n个城市   m条道路（n&lt;1000,   m&lt;10000)，每条道路有个长度，请找到从起点 s到终点  t的最短距离，并且输出经过的城市的名，如果有多条，输出字典序最小的那条；若从 s到   t没有路径，则输出“can’t   arrive”。从 road.in中读入数据，第一行有四个数，分别为 n，m，s，t。接下来 m行，每行三个数，分别为两个城市名和距离。输出结果到 road.out中。</p>
<pre><code class="c">#include&lt;iostream&gt;
#include&lt;fstream&gt;
#include&lt;queue&gt;
#include&lt;sstream&gt;
#include&lt;cstring&gt;
#include&lt;climits&gt;
#include&lt;cstdio&gt;
using namespace std;
const int INF=INT_MAX;
//

struct Edge{
    int to;
    int length;
    Edge(int to,int length):to(to),length(length){}
};
const int MAXN=100;
vector&lt;Edge&gt; graph[MAXN];
int dis[MAXN];//存的最小距离
int path[MAXN];//path[j]=i表示从i到j最短路的路径
struct Point{
    int number;
    int distance;//到源点距离
    Point(int n,int d):number(n),distance(d){}
    bool operator&lt; (const Point&amp; e) const{
        return distance&lt;e.distance;
    }
};

void Dijkstra(int s){
    priority_queue&lt;Point&gt; q;//若是逆向从时要对Point中的&gt;进行重载
    dis[s]=0;
    q.push(Point(s,dis[s]));
    while(!q.empty()){
        int u=q.top().number;//距离源点最近的点
        q.pop();
        for(int i=0;i&lt;graph[u].size();i++){
            int v=graph[u][i].to;
            int d=graph[u][i].length;
            if(dis[v]&gt;dis[u]+d){//所以初始化应该是无穷
                dis[v]=dis[u]+d;
                q.push(Point(v,dis[v]));
                path[v]=u;//由u到v是最短
            }
        }
    }
    return ;
}


int main(){
    int n,m,s,t;
    ifstream infile(&quot;in.txt&quot;);
    string str;
    getline(infile,str);
    stringstream in(str);
    in&gt;&gt;n; in&gt;&gt;m; in&gt;&gt;s; in&gt;&gt;t;
    memset(graph,0,sizeof(graph));
    //对int数组用fill初始化
    fill(dis,dis+MAXN,INF);//注意初始化的范围
    fill(path,path+MAXN,-1);
    //cout&lt;&lt;n&lt;&lt;&quot; &quot;&lt;&lt;m&lt;&lt;&quot; &quot;&lt;&lt;s&lt;&lt;&quot; &quot;&lt;&lt;t&lt;&lt;endl;
    for(int i=0;i&lt;m;i++){
        int a,b,l;
        getline(infile,str);
        stringstream in(str);
        in&gt;&gt;a; in&gt;&gt;b; in&gt;&gt;l;
        graph[a].push_back(Edge(b,l));
        graph[b].push_back(Edge(a,l));
    }
    Dijkstra(s);
    cout&lt;&lt;dis[t]&lt;&lt;endl;
    vector&lt;int&gt; v;
    while(path[t]!=-1){
        v.push_back(t);
        t=path[t];
    }
    v.push_back(s);
    for(int i=v.size()-1;i&gt;=0;i--){
        cout&lt;&lt;v[i]&lt;&lt;&quot; &quot;;
    }
}
</code></pre>

            <hr>
          </div>
          <br>
          <div>
            <p>
            
              <span>
                <i class="iconfont icon-inbox"></i>
                
                  <a class="hover-with-bg" href="/categories/%E7%AE%97%E6%B3%95">算法</a>
                  &nbsp;
                
              </span>&nbsp;&nbsp;
            
            
              <span>
                <i class="iconfont icon-tag"></i>
                
                  <a class="hover-with-bg" href="/tags/%E7%AE%97%E6%B3%95">算法</a>
                
                  <a class="hover-with-bg" href="/tags/c++">c++</a>
                
                  <a class="hover-with-bg" href="/tags/%E5%A4%8D%E8%AF%95%E7%9C%9F%E9%A2%98">复试真题</a>
                
              </span>
            
            </p>
            
              <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a href="https://zh.wikipedia.org/wiki/Wikipedia:CC_BY-SA_3.0%E5%8D%8F%E8%AE%AE%E6%96%87%E6%9C%AC" target="_blank" rel="nofollow noopener noopener">CC BY-SA 3.0协议</a> 。转载请注明出处！</p>
            
          </div>
        </div>
      </div>
    </div>
    <div class="d-none d-lg-block col-lg-2 toc-container">
      
  <div id="toc">
    <p class="h4"><i class="far fa-list-alt"></i>&nbsp;TOC</p>
    <div id="tocbot"></div>
  </div>

    </div>
  </div>
</div>

<!-- custom -->


<!-- Comments -->
<div class="col-lg-7 mx-auto nopadding-md">
  <div class="container comments mx-auto" id="comments">
    
      <br><br>
      
      
  <!--PC和WAP自适应版-->
  <div id="SOHUCS" sid='http://yoursite.com/2020/02/27/USTC%E6%9C%BA%E8%AF%95_12/'></div>
  <script type="text/javascript">
    (function () {
      var appid = 'cyuGAy6Y7';
      var conf = '';
      var width = window.innerWidth || document.documentElement.clientWidth;
      if (width < 960) {
        var head = document.getElementsByTagName('head')[0] || document.head || document.documentElement;
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.charset = 'utf-8';
        script.id = 'changyan_mobile_js';
        script.src = 'https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf;
        head.appendChild(script);
      } else {
        var loadJs = function (d, a) {
          var c = document.getElementsByTagName('head')[0] || document.head || document.documentElement;
          var b = document.createElement('script');
          b.setAttribute('type', 'text/javascript');
          b.setAttribute('charset', 'UTF-8');
          b.setAttribute('src', d);
          if (typeof a === 'function') {
            if (window.attachEvent) {
              b.onreadystatechange = function () {
                var e = b.readyState;
                if (e === 'loaded' || e === 'complete') {
                  b.onreadystatechange = null;
                  a();
                }
              };
            } else {
              b.onload = a;
            }
          }
          c.appendChild(b);
        };
        loadJs('https://changyan.sohu.com/upload/changyan.js', function () {
          window.changyan.api.config({ appid: appid, conf: conf });
        });
      }
    })(); </script>


    
  </div>
</div>

    
  </main>

  
    <a class="z-depth-1" id="scroll-top-button" href="#" role="button">
      <i class="fa fa-chevron-up scroll-top-arrow" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">Search</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">keyword</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  <footer class="mt-5">
  <div class="text-center py-3">
    <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><b>Hexo</b></a>
    <i class="iconfont icon-love"></i>
    <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"> <b>Fluid</b></a>
    <br>

    
  
    <!-- 不蒜子统计PV -->
    
    &nbsp;<span id="busuanzi_container_site_pv">总访问量 
          <span id="busuanzi_value_site_pv"></span> 次</span>&nbsp;
  
  
    <!-- 不蒜子统计UV -->
    
    &nbsp;<span id="busuanzi_container_site_uv">总访客数 
            <span id="busuanzi_value_site_uv"></span> 人</span>&nbsp;
  
  <br>



    


    <!-- cnzz Analytics icon -->
    

  </div>
</footer>

<!-- SCRIPTS -->
<script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js" ></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js" ></script>
<script src="https://cdn.staticfile.org/mdbootstrap/4.8.9/js/mdb.min.js" ></script>
<script src="/js/main.js" ></script>


  <script src="/js/lazyload.js" ></script>



  
    <script src="https://cdn.staticfile.org/tocbot/4.8.0/tocbot.min.js" ></script>
  
  <script src="/js/post.js" ></script>



  <script src="https://cdn.staticfile.org/smoothscroll/1.4.10/smooth-scroll.min.js" ></script>



  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>


<!-- Plugins -->


  
    <!-- Baidu Analytics -->
    <script>
      var _hmt = _hmt || [];
      (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?6a61255581242c8c58471dfbffd3bd66# 百度统计的Key，参见 https://tongji.baidu.com/sc-web/10000033910/home/site/getjs?siteId=13751376 代码获取中 hm.js? 后边的字符串";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  

  

  

  

  <!-- cnzz Analytics -->
  



  <script src="https://cdn.staticfile.org/prettify/r298/prettify.min.js" ></script>
  <script>
    $(document).ready(function () {
      $('pre').addClass('prettyprint  linenums');
      prettyPrint();
    })
  </script>



  <script src="https://cdn.staticfile.org/typed.js/2.0.10/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "USTC机试_12&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script src="https://cdn.staticfile.org/anchor-js/4.2.0/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "false",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script src="/js/local-search.js" ></script>
  <script>
    var path = "/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      getSearchFile(path);
      this.onclick = null
    }
  </script>



  <script src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <script>
    $("#post img:not(.no-zoom img, img[no-zoom])").each(
      function () {
        var element = document.createElement("a");
        $(element).attr("data-fancybox", "images");
        $(element).attr("href", $(this).attr("src"));
        $(this).wrap(element);
      }
    );
  </script>





  
  
    <script type="text/javascript">
      //定义获取词语下标
      var a_idx = 0;
      jQuery(document).ready(function ($) {
        //点击body时触发事件
        $("body").click(function (e) {
          //需要显示的词语
          var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善");
          //设置词语给span标签
          var $i = $("<span/>").text(a[a_idx]);
          //下标等于原来下标+1  余 词语总数
          a_idx = (a_idx + 1) % a.length;
          //获取鼠标指针的位置，分别相对于文档的左和右边缘。
          //获取x和y的指针坐标
          var x = e.pageX, y = e.pageY;
          //在鼠标的指针的位置给$i定义的span标签添加css样式
          $i.css({
            "z-index": 999,
            "top": y - 20,
            "left": x,
            "position": "absolute",
            "font-weight": "bold",
            "color": rand_color()
          });
          // 随机颜色
          function rand_color() {
            return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"
          }
          //在body添加这个标签
          $("body").append($i);
          //animate() 方法执行 CSS 属性集的自定义动画。
          //该方法通过CSS样式将元素从一个状态改变为另一个状态。CSS属性值是逐渐改变的，这样就可以创建动画效果。
          //详情请看http://www.w3school.com.cn/jquery/effect_animate.asp
          $i.animate({
            //将原来的位置向上移动180
            "top": y - 180,
            "opacity": 0
            //1500动画的速度
          }, 1500, function () {
            //时间到了自动删除
            $i.remove();
          });
        });
      })
      ;
    </script>
  



  <script>(function (i, s, o, g, r, a, m) {
      i['DaoVoiceObject'] = r;
      i[r] = i[r] ||
        function () {
          (i[r].q = i[r].q || []).push(arguments);
        };
      i[r].l = 1 * new Date();
      a = s.createElement(o);
      m = s.getElementsByTagName(o)[0];
      a.async = 1;
      a.src = g;
      a.charset = 'utf-8';
      m.parentNode.insertBefore(a, m);
    })(window, document, 'script', ('https:' === document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/246e9537.js", 'daovoice');
    daovoice('init', {
      app_id: "246e9537",
    });
    daovoice('update');
  </script>




<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginModelPath":"assets/","model":{"jsonPath":"/live2dw/assets/wanko.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":false},"log":false,"pluginJsPath":"lib/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
